package com.kxf.bsdiff.jni;

/**
 * @ProjectName: AndroidTestDemo
 * @Package: com.kxf.bsdiff.jni
 * @ClassName: BsDiffUtil
 * @Description: java类作用描述
 * @Author: kuangxuefeng
 * @qq: 1024883177
 * @CreateDate: 2021/3/10 16:12
 */
public class BsDiffUtil {
    static {
        System.loadLibrary("bsdiffutil");
    }

    public native static String getInfo();

    //生成差分包
    public static native int diff(String oldpath, String newpath, String patch);

    //旧apk和差分包合并

    /**
     * native方法
     * 使用路径为oldApkPath的apk与路径为patchPath的补丁包，合成新的apk，并存储于newApkPath
     *
     * @param oldpath
     * @param newpath
     * @param patch
     * @return
     */
    public static native int patch(String oldpath, String newpath, String patch);

    public static native int executeBZ2Command(String command);
}
